<script>
  $('.collapse').collapse();
</script>
<!-- Profile Index Grid Section -->
<section id="profile-index" class="bg-light-gray">
  <div class="container">
    <div class="row">
      <div class="col-lg-12">
        <% if @profiles.count %>
          <div>
            <%= link_to 'Add New Profile', new_profile_path, { :class=>"btn btn-success btn-lg", :style=>"margin-top:10px;" } %>
          </div>
        <% else %>
          <p>Welcome, you haven't created any profile yet. To start, please click the button below 
               to add a new profile now.</p>
          <%= link_to 'Add New Profile', new_profile_path, { :class =>"btn btn-success btn-lg" } %>
        <% end %>
      </div>
    </div>
    <div class="row">
      <% @profiles.each do |profile| %>
        <div class="col-md-3 col-sm-5 tour-item">
          <div class="tour-hover">
            <div class="tour-hover-content">
              <i class="fa fa-edit fa-3x"></i>
              <%= link_to 'Update', nil, { :class=>"btn btn-warning btn-lg", :style=>"margin-top:10px;" } %>
              <%= link_to 'Delete', nil, { :class=>"btn btn-danger btn-lg", :style=>"margin-top:10px;" } %>
             </div>
           </div>
           <%= link_to(image_tag('avatar/woman-workout.jpg', :class=>"img-responsive"), profile_path(profile), :class=>"tour-link") %>
           <div class="tour-caption">
             <h4><%= profile.name%></h4>
             <p class="text-muted">Graphic Design</p>
           </div>
         </div>
       <% end %>
    </div>
  </div>
</section>

